  <body class=""> 
  <!--<![endif]-->
  	<?php global $isLogin;if(!$isLogin){?>
    <div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                </ul>
                <a class="brand" href="index.html"><span class="first">HOME</span> <span class="second"><?=C('APP_NAME')?></span></a>
        </div>
    </div>
   	<?php }?>
    <div class="row-fluid">
	    <div class="dialog">
	        <div class="block">
	            <p class="block-heading">帐号开通</p>
	            <div class="block-body">
	                <form action="/user/regist">
	                    <label>邮箱地址</label>
	                    <input type="text" name="email" id="email" class="span12">
	                    <label>用户名</label>
	                    <input type="text" name="username" id="username" class="span12">
	                    <label>密码</label>
	                    <input type="password" name="password" id="passwd" class="span12">
	                    <label>重复密码</label>
	                    <input type="password" class="span12" id="repasswd" name="repassword">
	                    <a href="javascript:" id="submitbtn" class="btn btn-primary pull-right">添加用户</a>
	                    <div class="clearfix"></div>
	                </form>
	            </div>
	        </div>
	    </div>
</div>
    <script src="/statics/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
            $('#submitbtn').click(function(){
            	var username = $('#username').val();
            	var passwd = $('#passwd').val();
            	var email = $('#email').val();
            	if($('#repasswd').val() != passwd){
            		showmsg('两次密码不一致！');
            	}else if(!($('#email').val())){
            		showmsg('邮箱账户必填！');
            	}else if(!($('#username').val())){
            		showmsg('用户名必填！');
            	}else if(!passwd){
            		showmsg('密码字段必填！');
            	}else{
            		$.post('/user/regist',{'username':username,'passwd':passwd,'email':email},function(data){
	            		if(data.code == 1){
	            			alert(data.msg);location.reload();
	            		}
                	},'json');
            	}
            });
        });
    </script>
  </body>
</html>